//
//  PSMTabBarControl+WCExtensions.m
//  WabbitCode
//
//  Created by William Towe on 2/12/09.
//  Copyright 2009 Revolution Software. All rights reserved.
//

#import "PSMTabBarControl+WCExtensions.h"
#import "WCAppController.h"
#import "WCMacros.h"


@implementation PSMTabBarControl (WCExtensions)
- (void)performSetup; {
	// I happen to like the aqua-licious tabs the best
	[self setStyleNamed:@"Unified"];
	// no add tab button
	[self setShowAddTabButton:NO];
	// allow close button for only tab, this may change
	[self setCanCloseOnlyTab:YES];
	// make sure the tab bar is always visible
	[self setHideForSingleTab:NO];
	[self setUseOverflowMenu:YES];
	// new tabs are smoothly animated in and out on addition and removal
	[self setAutomaticallyAnimates:NSUserDefaultsBoolForKey(kWCPrefsTabsAnimateAddingAndRemovingKey)];
	// keep the active tab out of the overflow menu
	[self setAlwaysShowActiveTab:YES];
	// not sure if this will be used
	[self setTearOffStyle:PSMTabBarTearOffMiniwindow];
	// hold option and drag the mouse to switch tabs
	[self setAllowsScrubbing:NSUserDefaultsBoolForKey(kWCPrefsTabsAllowScrubbingOfTabsKey)];
	// determines whether a click on the close button of a non-active tab does anything
	[self setAllowsBackgroundTabClosing:YES];
	// cell optimum width
	[self setCellOptimumWidth:150];
}
@end
